This invention relates to numerically controlled machine tools and numerical control devices, and more particularly to those by which the work is machined by moving the tool and the work in accordance with the machining programs for controlling the movement of the tool with respect to the work.
FIG. 7 is a block diagram showing schematically the organization of a conventional numerically controlled lathe. The numerically controlled lathe 51 consists of a lathe device 20 and a numerical control device 60. The tool 32 of the lathe device 20 can be translated along the X-axis and the Z-axis running perpendicular to each other. In FIG. 7, the arrows at reference characters X and Z represent the positive directions of the X-axis and Z-axis, respectively. The work W is held by a main spindle 33 and/or an auxiliary spindle 36. The work W can be translated along the B-axis running parallel to the Z-axis. The arrow at reference character B represents the positive direction of the B-axis.
The translation along the X-axis is effected by an amplifier 21x and a motor 22x. The translation along the Z-axis is effected by an amplifier 21z and a motor 22z. The translation along the C-axis (not shown) is effected by an amplifier 21c and a motor 22c. The translation along the B-axis is effected by an amplifier 21b and a motor 22b.
The numerical control device 60 includes: a machining program analyzer unit 61 for reading thereinto a machining program Q prepared by an operator and then analyzing the commands thereof; a interpolation data generator unit 62 for generating the interpolation data which is necessary for translating the respective axes of the lathe device 20 in accordance with the commands of the machining program Q analyzed by the machining program analyzer unit 61; and an interpolator unit 63 which translates the axes of the lathe device 20 in accordance with the interpolation data obtained by the interpolation data generator unit 62.
FIG. 8 is a flowchart showing the interpolation data generation executed by the interpolation data generator unit. At step S51, the interpolation data generator unit 62 judges whether or not the command obtained by an analysis of the machining program Q is a translation command. If the judgment is affirmative, the interpolation vector is calculated at step S52 in accordance with the command; if the judgment is negative, nothing is done. Next, at step S53, judgment is made whether or not the command is an arc command. If the judgment is affirmative, the arc length and the initial machining angle is calculated in accordance with the command at step S54. After the arc length and the initial machining angle is calculated--or immediately after step S53 if the judgment is negative thereat--the magnitudes of translations are calculated at step S58. Further, at step S59, the distribution ratio (described below) for the respective axes are calculated.
FIG. 9 is a diagram for explaining the interpolation data in the case where a linear translation command is given. The command is that the tool 32 be translated linearly from an initial point S (Xs, Zs) to an end point E (Xe, Ze). The interpolation vector is represented by V, while the amounts of translations along the X-axis and the Z-axis are represented by .DELTA.X and .DELTA.Z, respectively. Thus, EQU .DELTA.X=Xe-Xs EQU .DELTA.Z=Ze-Zs
On the other hand, the amounts of translation along the B-axis, .DELTA.B, is null: EQU .DELTA.B=0
Thus, the distribution ratios: Sx, Sz, and Sb, for the X-axis, Z-axis, and B-axis are: EQU Sx=.DELTA.X/Lv EQU Sz=.DELTA.Z/Lv EQU Sb=0
where Lv is the length of the interpolation vector V: EQU Lv.sup.2 =(Xe-Xs).sup.2 +(Ze-Zs).sup.2
Under the above circumstance, the machining program Q is given, for example, by: EQU G00XXsZZs; EQU G01XXeZZeFf;
FIG. 10 is a diagram for explaining the interpolation data in the case where an arc translation command is given. The command is that the tool 32 be translated along an arc from an initial point S (Xs, Zs) to an end point E (Xe, Ze), where: Lz is an arc length; .theta.z is the initial angle; Rs is the initial radius; Re the end (final) radius; and .DELTA.R is the difference between the initial and the final radii. Thus, the amounts of translations .DELTA.X, .DELTA.Z, and .DELTA.B along the X-axis, Z-axis, and B-axis, are the same as in the case of the linear translation: EQU .DELTA.X=Xe-Xs EQU .DELTA.Z=Ze-Zs EQU .DELTA.B=0
Thus, the distribution ratios: Sx, Sz, and Sb, along the X-axis, Z-axis, and B-axis are: EQU Sx=.DELTA.X/Lv EQU Sz=.DELTA.Z/Lv EQU Sb=0
where the length Lv of the interpolation vector V is given by: EQU Lv.sup.2 =Lz.sup.2 +.DELTA.R.sup.2
The distribution ratios Sl and Sr for the arc length Lz and the radial difference .DELTA.R are given by: EQU Sl=Lz/Lv EQU Sr=.DELTA.R/Lv
Under the above circumstance, the machining program Q is given, for example, by: EQU G00XXsZZs; EQU G01XXeZZeIXoKZoFf;
Usually, the numerically controlled lathe 51 effects machining by translating the tool 32 along the X-axis and the Z-axis. It is exceptional that the work W is translated along the B-axis. Thus, the arc movement commands can be executed by means of the former method of operation (i.e., the translation of the tool 32), but not by means of the latter method of operation (i.e., the translation of the work W).
FIG. 11 shows schematically another conventional numerically controlled lathe. In the case of this numerically controlled lathe 71, the machining program is prepared as though the tool 42 were moved along the X-axis and the Z-axis. Actually, however, the tool 42 is moved along the X-axis only, the work W being translated along the Z-axis by means of the spindle 43.
Another related prior art is a machining center provided with a machining unit which is disclosed in Japanese Laid-Open Patent (Kokai) No. 62-176733. In the case of this machining center, two tools are utilized in machining. A first tool moves along mutually perpendicular first and second axes, and a second tool moves along a third axis parallel to the second axis. It is possible to machine the work by translating the second tool along the third axis in accordance with the translation command for translating the first tool along the first axis.
The conventional numerically controlled lathe 51 of FIG. 7 has the following disadvantage. When the tool 32 is translated along the X-axis and the work W is translated along the B-axis in order to machine the work W, the operator must prepare the program by calculating the amounts of translations via the X-axis/B-axis system, which involves the movements of both the tool 32 and the main spindle 33 and thus is burdensome for the operator. Further, arc commands cannot be used.
The conventional numerically controlled lathe 71 of FIG. 11 has the following disadvantage. Since it is not possible to machine the work W by solely translating the tool 42 two-dimensionally without translating the work W, some kinds of works W cannot be machined in accordance with their dimensional specifications.
Further, the machining center disclosed in Japanese Laid-Open Patent (Kokai) No. 62-176733 has the following disadvantage. The tool utilized in machining changes from the first to the second tool during the machining operation. Thus, when it is desirable to machine the work by a single tool, this machining center cannot be used.